﻿CREATE FUNCTION [audit].[GetTraceLogicalOperatorNo]
(@Operator CHAR (3))
RETURNS INT
AS
BEGIN
	DECLARE @ReturnValue int

	SELECT @ReturnValue = (
		CASE @Operator
			WHEN 'AND' THEN 0
			WHEN 'OR' THEN 1
		END
	)

	RETURN(@ReturnValue)
END